package com.lingxu.base.system.manage.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

@Data
@TableName("sys_user")
@EqualsAndHashCode()
@Accessors(chain = true)
@ApiModel(value="sys_user对象", description="用户信息表")
public class SysUser implements Serializable{

	/**主键*/
	@TableId(type = IdType.ASSIGN_UUID)
    @ApiModelProperty(value = "主键（编辑时必填）")
	private String id;
	/**用户账号*/
    @ApiModelProperty(value = "用户账号")
	private String username;
	/**用户姓名*/
    @ApiModelProperty(value = "用户姓名")
	private String name;
	private String region;
	private String regionName;
	/**用户密码（加密）*/
    @ApiModelProperty(value = "用户密码")
	private String password;
	/**密码加密密钥*/
//    @ApiModelProperty(value = "密码加密密钥",hidden = true)
//	private String salt;
	/**身份证号*/
    @ApiModelProperty(value = "身份证号")
	private String idcard;
	/**性别*/
    @ApiModelProperty(value = "性别")
	private String sex;
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	@ApiModelProperty(value = "出生日期")
	private Date birthday;
	@ApiModelProperty(value = "出生地")
	private String birthplace;
	@ApiModelProperty(value = "部门ID")
	private String deptid;
	/**手机号码*/
    @ApiModelProperty(value = "手机号码")
	private String phone;
	@ApiModelProperty(value = "照片")
	private String photo;
	/**手机号码*/
	@ApiModelProperty(value = "联系电话")
	private String tel;
	@ApiModelProperty(value = "是否删除1：是 0否")
	private String isdel;
	/**联系地址*/
    @ApiModelProperty(value = "联系地址")
	private String address;
	/**邮箱*/
    @ApiModelProperty(value = "邮箱")
	private String email;
	/**密码最后更新时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "密码最后更新时间",hidden = true)
	private Date lastupdpwdtime;

	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
	@DateTimeFormat(pattern="yyyy-MM-dd")
	@ApiModelProperty(value = "有效期")
	private Date validatedate;
	/**创建时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间",hidden = true)
	private Date createtime;
	/**创建人*/
    @ApiModelProperty(value = "创建人",hidden = true)
	private String createby;
	/**备注*/
    @ApiModelProperty(value = "备注")
	private String remark;
	/**是否领导*/
    @ApiModelProperty(value = "是否领导(0:否; 1:是;)")
	private String isleader;
	/**用户状态 0冻结 1正常*/
	@ApiModelProperty(value = "用户状态 0冻结 1正常")
	private String status;
	@ApiModelProperty(value = "排序")
	private Integer personsort;

	/**用户状态 0冻结 1正常*/
	@ApiModelProperty(value = "是否激活（1：已激活 0未激活）")
	private String isuse;

	@ApiModelProperty(value = "部门名称")
	private String deptname;

//	@ApiModelProperty(value = "是否管理员1.是 0.否")
//	private String adminflag;

	@TableField(exist = false)
	@ApiModelProperty(value = "已分配角色ID")
	private List<String> roleids;
	@TableField(exist = false)
	@ApiModelProperty(value = "未分配角色")
	private List<SysRole> wprrole;
	@TableField(exist = false)
	@ApiModelProperty(value = "已分配角色")
	private List<SysRole> yfprole;

	@TableField(exist = false)
	private Integer pageNo;
	@TableField(exist = false)
	private Integer pageSize;

	@TableField(exist = false)
	private String flag;
}
